package com.mark.spring.config;

import com.mark.spring.dao.PersonDao;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * Created by Choisaaaa on 2018/7/9.
 */
@Configuration
@ComponentScan(value = "com.mark.spring")
public class MyPersonDaoConfig {

    @Bean
    @Primary
    public PersonDao personDao(){
        return new PersonDao(2);
    }
}
